@tailwind base;
@tailwind components;
@tailwind utilities;

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

code {
  font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
    monospace;
}

/* 添加阅读页面自定义样式 */
.bg-reader-paper {
  background-color: #f8f8f0;
}

.bg-reader-cream {
  background-color: #f5f1e4;
}

.bg-reader-night {
  background-color: #1a1a1a;
}

.text-reader-ink {
  color: #333333;
}

/* 优化移动设备的安全区域 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .pb-safe {
    padding-bottom: env(safe-area-inset-bottom);
  }
  
  .mb-safe {
    margin-bottom: env(safe-area-inset-bottom);
  }
}

/* 优化移动设备的点击目标 */
@media (max-width: 640px) {
  button, 
  [role="button"],
  a.button {
    min-height: 44px;
    min-width: 44px;
  }
  
  .touch-target {
    min-height: 44px;
    min-width: 44px;
  }
}

/* 阅读器行距和字体优化 */
@media (max-width: 640px) {
  .reader-content p {
    margin-bottom: 1.2em;
  }
}

/* 滚动条自定义样式 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* 暗色模式下滚动条 */
.dark::-webkit-scrollbar-thumb {
  background: #555;
}

.dark::-webkit-scrollbar-thumb:hover {
  background: #777;
} 